# SPDX-License-Identifier: GPL-3.0-or-later
#!/bin/sh
set -e

cp /usr/lib/cmake/eigen3/*.cmake old_eigen_backup/
sudo cp /usr/local/share/eigen3/cmake/*.cmake /usr/lib/cmake/eigen3/

cd autoware.ai
MAKEFLAGS="-j 4" AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --executor sequential
sudo cp ../old_eigen_backup/*.cmake /usr/lib/cmake/eigen3/
